package com.castle.fortress.admin.study.course.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.castle.fortress.admin.study.course.entity.StudyCourseChapterEntity;
import com.castle.fortress.admin.study.course.dto.StudyCourseChapterDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.Map;
import java.util.List;

/**
 * 课程章节表 服务类
 *
 * @author castle
 * @since 2023-01-31
 */
public interface StudyCourseChapterService extends IService<StudyCourseChapterEntity> {

    /**
     * 分页展示课程章节表列表
     * @param page
     * @param studyCourseChapterDto
     * @return
     */
    IPage<StudyCourseChapterDto> pageStudyCourseChapter(Page<StudyCourseChapterDto> page, StudyCourseChapterDto studyCourseChapterDto);

    /**
    * 分页展示课程章节表扩展列表
    * @param page
    * @param studyCourseChapterDto
    * @return
    */
    IPage<StudyCourseChapterDto> pageStudyCourseChapterExtends(Page<StudyCourseChapterDto> page, StudyCourseChapterDto studyCourseChapterDto);
    /**
    * 课程章节表扩展详情
    * @param id 课程章节表id
    * @return
    */
    StudyCourseChapterDto getByIdExtends(Long id);

    /**
     * 展示课程章节表列表
     * @param studyCourseChapterDto
     * @return
     */
    List<StudyCourseChapterDto> listStudyCourseChapter(StudyCourseChapterDto studyCourseChapterDto);

    /**
     * 删除课程对应的章节
     * @param courseId
     */
    void delByCourseId(Long courseId);
    /**
     * 删除课程对应的章节
     * @param courseIds
     */
    void delByCourseIds(List<Long> courseIds);

    /**
     * 获取课程相关章节
     * @param courseId
     * @return
     */
    List<StudyCourseChapterDto> getListByCourseId(Long courseId);

    /**
     * 获取会员学习的章节进度
     * @param id
     * @param memberId
     * @return
     */
    List<StudyCourseChapterDto> getStudyListByCourseId(Long id,Long memberId);
}
